home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1397 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Executing DOS command from C
  5. Date: Sat, 13 Jan 96 14:43:44 GMT
  6. Organization: none
  7. Message-ID: <821544224snz@genesis.demon.co.uk>
  8. References: <4d28di$b7g@globe.indirect.com> <4d2gt1$kie@cisun2000.unil.ch>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4d2gt1$kie@cisun2000.unil.ch>
  15.            FDUFRESN@hec.unil.ch "Francois Dufresne" writes:
  16.  
  17. > Include:   <process.h>, <stdlib.h>, <errno.h>
  18. >
  19. > Syntax:    int system( char *command );
  20.  
  21. As far as the C language is concerned you only need to include stdlib.h (since
  22. system returns an int you could get away with not even including this, but
  23. it is not recommended). process.h is not a standard C header file. errno.h
  24. would be necessary if you wanted to examine errno. However the C language
  25. doesn't define system() as setting errno (however this means that a
  26. particular implementation is allowed to).
  27.  
  28. -- 
  29. -----------------------------------------
  30. Lawrence Kirby | fred@genesis.demon.co.uk
  31. Wilts, England | 70734.126@compuserve.com
  32. -----------------------------------------
  33.